<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    const {
      log: l
    } = console;

    let a = 1,
      b = 2;
    [a, b] = [b, a];

    l(a, b);
  </script>
</body>

</html>